/*
* @Author: xfy
* @Date:   2017-09-06 16:37:41
* @Last Modified by:   xfy
* @Last Modified time: 2017-09-07 09:28:53
*/
'use strict';
var _supper = require('util/supper.js');
var _userAdmin = {
    //用户登录
    login : function(userInfo, resolve, reject){
        _supper.request({
            url     : _supper.getServerUrl('/userManage!login'),
            data    : userInfo,
            method  : 'POST',
            success : resolve,
            error   : reject
        });
    },
    //管理员退出登录
    logout : function(resolve, reject){
        _supper.request({
            url     : _supper.getServerUrl('/userManage!logout'),
            method  : 'POST',
            success : resolve,
            error   : reject
        });
    },
    //检查管理登录状态
    checkLogin : function(resolve, reject){
        _supper.request({
            url     : _supper.getServerUrl('/userManage!getUserInfo'),
            method  : 'POST',
            success : resolve,
            error   : reject
        });
    }
}
module.exports = _userAdmin;